﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using CIIS.Common;
using DevExpress.XtraEditors;
using Contract.Domain;

namespace CIIS
{
    public partial class SecretPersonManage : Manage
    {
        public SecretPersonManage()
        {
            InitializeComponent();

            InitUserControl();
        }

        private void InitUserControl()
        {
            RegisterOptFormType(typeof(SecretPerson), typeof(SecretPerson));

            BindGridData(typeof(t_tq_tqry));

            InitButtonsWithFlag(new string[] { "添加" }, new EOperateType[] { EOperateType.Add });

            InitParamControl(new bool[] { true, false, true, true, false, false },
                new string[] { "代号：", "", "姓名：", "审核状态：", "", "" },
                new DropdownControlParam[] { null, null, null, dao.GetDropdownControlParam<bm_shzt>(), null, null });

            t_tq_tqry a = new t_tq_tqry();
            InitGridViewDataColumns(new string[] { "选中", "代号", "姓名", "身份证号", "类别", "准建时间", "使用人", "变更情况", "审核状态" },
                new string[] { "IsSelected", "RYDH", "XM", "SFZH", "GNLB", "RKSJ", "SYMJ","BGLX", "SHZT" },
                new DropdownControlParam[] { null, null, null, null, null, null, null, null, dao.GetDropdownControlParam<bm_shzt>() });

            InitGridViewOptColumnWithFlag(new string[] { "详情", "修改", "删除", "变更" },
                new EOperateType[] { EOperateType.Detail, EOperateType.Modify, EOperateType.Delete, EOperateType.Change });
        }

        //void btnAdd_click(object sender, EventArgs ent)
        //{
        //    SecretPerson dlg = new SecretPerson();
        //    dlg.OptType = EOperateType.Add;
        //    dlg.ShowDialog();
        //}
        //void linkDetail_click(object sender, EventArgs ent)
        //{
        //    SecretPerson dlg = new SecretPerson();
        //    dlg.OptType = EOperateType.Detail;
        //    dlg.ShowDialog();
        //}
        //void linkModify_click(object sender, EventArgs ent)
        //{
        //    SecretPerson dlg = new SecretPerson();
        //    dlg.OptType = EOperateType.Modify;
        //    dlg.ShowDialog();
        //}
        //void linkDelete_click(object sender, EventArgs ent)
        //{
        //}
        //void linkChange_click(object sender, EventArgs ent)
        //{
        //    SecretPerson dlg = new SecretPerson();
        //    dlg.OptType = EOperateType.Change;
        //    dlg.ShowDialog();
        //}
    }
}
